﻿using ExDUIR.NET.Declaration;
using ExDUIR.NET.Handle;

namespace ExDUIR.NET.Engine
{
    public class EngineCreationOptions
    {
        public byte[] ThemeData { get; set; }
        public int GlobalFlags { get; set; }
        public ExCursorHandle CursorHandle { get; set; }
        public string ClassName { get; set; }
        public IntPtr InstanceHandle { get; set; }
    }
    public class ExEngine
    {
        public static void Init(EngineCreationOptions options)
        {
            ExAPI.Ex_Init(options.InstanceHandle, options.GlobalFlags, options.CursorHandle.Handle, null, options.ThemeData, (IntPtr)options.ThemeData.Length, null, IntPtr.Zero);
        }

        public static void Uninit()
        {
            ExAPI.Ex_UnInit();
        }

        public static void Run()
        {
            ExAPI.Ex_WndMsgLoop();
        }
    }
}
